
<div style="margin:1% 5%;">
  <div class="layui-form-item" style=";padding-left: 30%;">

    <div class="layui-input-inline">
      <input type="text" name="username" placeholder="请输入" autocomplete="off" class="layui-input">

    </div>
    <label class="layui-form-label" style="padding: 0!important;"><button type="button" class="layui-btn">默认按钮</button></label>
  </div>
</div>

<div class="layui-form">
  <table class="layui-table">
    <colgroup>
      <col width="150">
      <col width="150">
      <col width="200">
      <col>
    </colgroup>
    <thead>
    <tr>
      <th colspan="11">终端列表</th>
      <th>共有数据：<span>0</span>条</th>
    </tr>

    <tr>
      <th><input type="checkbox" name="like1[write]" lay-skin="primary"  checked=""></th>
      <th>终端编号</th>
      <th>IP地址</th>
      <th>Mac地址</th>
      <th>房间号</th>
      <th>站点编号</th>
      <th>是否在线</th>
      <th>所属分组</th>
      <th>版本</th>
      <th>型号</th>
      <th>操作</th>
    </tr>
    </thead>
    <tbody>
    <tr>

    </tr>
    <tr>

    </tr>
    <tr>

    </tr>
    <tr>

    </tr>
    <tr>

    </tr>
    </tbody>
  </table>
  <div id="demo1"></div>
</div>


<script>
    layui.use(['laypage', 'layer'], function(){
        var laypage = layui.laypage
            ,layer = layui.layer;



        //总页数大于页码总数
        // laypage.render({
        //     elem: 'demo1'
        //     ,count: 70 //数据总数
        //     ,jump: function(obj){
        //         console.log(obj)
        //     }
        // });



        //将一段数组分页展示

        //测试数据
        var data = [
            '北京',
            '上海',
            '广州',
            '深圳',
            '杭州',
            '长沙',
            '合肥',
            '宁夏',
            '成都',
            '西安',
            '南昌',
            '上饶',
            '沈阳',
            '济南',
            '厦门',
            '福州',
            '九江',
            '宜春',
            '赣州',
            '宁波',
            '绍兴',
            '无锡',
            '苏州',
            '徐州',
            '东莞',
            '佛山',
            '中山',
            '成都',
            '武汉',
            '青岛',
            '天津',
            '重庆',
            '南京',
            '九江',
            '香港',
            '澳门',
            '台北'
        ];

        //调用分页
        // laypage.render({
        //     elem: 'demo20'
        //     ,count: data.length
        //     ,jump: function(obj){
        //         //模拟渲染
        //         document.getElementById('biuuu_city_list').innerHTML = function(){
        //             var arr = []
        //                 ,thisData = data.concat().splice(obj.curr*obj.limit - obj.limit, obj.limit);
        //             layui.each(thisData, function(index, item){
        //                 arr.push('<li>'+ item +'</li>');
        //             });
        //             return arr.join('');
        //         }();
        //     }
        // });

    });
</script>
